import {
    request
} from './config.js'

/**
 * banner
 * **/

export async function getRechargeFee() {
    return request(`/order/recharge_face?size=20`, 'get') //默认获取第一页
}

/**
 * 线下充值
 * @returns {Promise<unknown>}
 */
export async function RechargeByOnline(params) {
    return request(`/order/recharge/online`, 'POST', params) //默认获取第一页
}

/**
 * 申请联合创始人
 * @returns {Promise<unknown>}
 */
export async function applyCoFounder(params) {
    return request(`/user/co_founder`, 'POST', params) //默认获取第一页
}

/**
 * 申请联合创始人审核
 * @returns {Promise<unknown>}
 */
export async function getApplyCoFounder(params) {
    return request(`/user/co_founder/detail`, 'GET', params) //默认获取第一页
}

/**
 * 发票列表
 * @returns {Promise<unknown>}
 */
export async function getInvoiceList(params) {
    return request(`/user/invoice/user/page`, 'GET', params) //默认获取第一页
}

/**
 * 添加发票
 * @returns {Promise<unknown>}
 */
export async function putInvoiceList(params) {
    return request(`/user/invoice/user/invoice`, 'POST', params) //默认获取第一页
}

/**
 * 得到已开的发票
 * @returns {Promise<unknown>}
 */
export async function getUserInvoiceList(params) {
    return request(`/user/invoice/pages`, 'GET', params) //默认获取第一页
}

/**
 * 得到已开的发票
 * @returns {Promise<unknown>}
 */
export async function getConfigs(params) {
    return request(`/mall/configs`, 'GET', params) //默认获取第一页
}

/**
 * 获取配置信息gg
 */
export async function getUserQrcode(param) {
    return request(`/user/get_user_qrcode`, 'POST', param)
}

/**
 * 获取配置信息gg
 */
export async function getParentLevel(param) {
    return request(`/user/get_parent_level`, 'GET', param)
}

/**
 * 获取配置信息gg
 */
export async function setInvoiceDefault(id, title_type) {
    return request(`/user/invoice/default?id=${id}&title_type=${title_type}`, 'POST', [])
}
